<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/consumerinfodto/ConsumerinfoDTO.jsx此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/system/consumerinfodto/ConsumerinfoDTO.jsx";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'ConsumerId',
            footer: "Foots",
            cnName: '移库订单管理',
            name: 'consumerinfodto/ConsumerinfoDTO',
            url: "/ConsumerinfoDTO/",
            sortName: "ConsumerId"
        });
        const editFormFields = ref({ "OrderNumber": "", "OrderId": "", "MakeupPeople": "", "MakeupTime": "", "Remark": "", "Auditreason": "", "ProductId": "", "ProductName": "", "ProductCode": "", "ProductSKU": "", "Batch": "", "Price": "", "Number": "", "Warehouse": "", "WarehouseLocation": "" });
        const editFormOptions = ref([[{ "dataKey": "移库类型", "data": [], "title": "移库单类型", "field": "OrderNumber", "type": "select" },
        { "title": "关联订单号", "field": "OrderId", "type": "text" }],
        [{ "title": "制单人", "field": "MakeupPeople", "type": "text" },
        { "title": "制单时间", "field": "MakeupTime", "type": "month" }],
        [{ "title": "备注", "field": "Remark", "type": "textarea" },
        { "title": "审核原因", "field": "Auditreason", "type": "text" }],
        [{ "title": "产品ID", "field": "ProductId", "type": "text" },
        { "title": "产品名称", "field": "ProductName", "type": "text" }],
        [{ "title": "产品编码", "field": "ProductCode", "type": "text" },
        { "title": "规格", "field": "ProductSKU", "type": "text" }],
        [{ "title": "批次", "field": "Batch", "type": "text" },
        { "title": "单价", "field": "Price", "type": "text" }],
        [{ "title": "数量", "field": "Number", "type": "text" },
        { "title": "当前库位", "field": "Warehouse", "type": "text" }],
        [{ "title": "移入库位", "field": "WarehouseLocation", "type": "text" }]]);
        const searchFormFields = ref({ "OrderNumber": "", "OrderId": "", "MakeupPeople": "" });
        const searchFormOptions = ref([[{ "dataKey": "移库类型", "data": [], "title": "移库单类型", "field": "OrderNumber", "type": "select" }, { "title": "关联订单号", "field": "OrderId", "type": "text" }, { "title": "制单人", "field": "MakeupPeople", "type": "text" }]]);
        const columns = ref([{ field: 'ConsumerId', title: '移库单号', type: 'string', link: true, width: 220, require: true, align: 'left', sort: true },
        { field: 'OrderNumber', title: '移库单类型', type: 'int', bind: { key: '移库类型', data: [] }, width: 110, align: 'left' },
        { field: 'OrderId', title: '关联订单号', type: 'string', width: 220, align: 'left' },
        { field: 'MakeupPeople', title: '制单人', type: 'string', width: 220, align: 'left' },
        { field: 'MakeupTime', title: '制单时间', type: 'datetime', width: 150, align: 'left', sort: true },
        { field: 'Remark', title: '备注', type: 'string', width: 220, align: 'left' },
        { field: 'Auditreason', title: '审核原因', type: 'string', width: 220, align: 'left' },
        { field: 'ProductId', title: '产品ID', type: 'int', width: 110, align: 'left' },
        { field: 'ProductName', title: '产品名称', type: 'string', width: 220, align: 'left' },
        { field: 'ProductCode', title: '产品编码', type: 'string', width: 220, align: 'left' },
        { field: 'ProductSKU', title: '规格', type: 'string', width: 220, align: 'left' },
        { field: 'Batch', title: '批次', type: 'string', width: 220, align: 'left' },
        { field: 'Price', title: '单价', type: 'decimal', width: 110, align: 'left' },
        { field: 'Number', title: '数量', type: 'string', width: 220, align: 'left' },
        { field: 'Warehouse', title: '当前库位', type: 'string', width: 220, align: 'left' },
        { field: 'WarehouseLocation', title: '移入库位', type: 'string', width: 220, align: 'left' },
        { field: 'IsDel', title: '是否删除', type: 'int', width: 110, hidden: true, align: 'left' }]);
        const detail = ref({
            cnName: "#detailCnName",
            table: "#detailTable",
            columns: [],
            sortName: "",
            key: ""
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
